/* Add at the top of style.css and dark.css */
body, 
.taskbar, 
.nav-buttons, 
.menu-label, 
.button, 
.buttonmain, 
.interface, 
.interface_2, 
.footer, 
.grid a, 
.grid a img, 
#theme-toggle {
    transition: background-color 0.5s ease, 
                color 0.5s ease, 
                border-color 0.5s ease, 
                box-shadow 0.5s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

body{

    margin: 0;
    color: rgb(255, 255, 255);
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgb(17, 17, 17);
    font-size: 20px;

}
.taskbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8dvh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2vw;
    backdrop-filter: blur(7px) saturate(150%) contrast(120%);
    -webkit-backdrop-filter: blur(7px) saturate(150%) contrast(120%);
    background-color: rgba(0, 0, 0, 0.432);
    box-shadow:
        inset 0 0 20px -5px rgba(0, 0, 0, 0.742),
        0px 6px 24px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(73, 73, 73, 0.475);
    z-index: 100;

}

/* Default: show buttons, hide menu label */
.menu-label {
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-size: 20px;
    margin: 10px;
    align-items: center;
    display: none;
}
.nav-buttons {
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-size: 20px;
    margin: 10px;
    align-items: center;
}

.nav-buttons:hover{

    color: rgb(199, 199, 199);
    font-size: 20px;
    text-decoration: none;
    margin: 10px;
    align-items: center;

}
.menu-label:hover {
    color: rgb(199, 199, 199);
    font-size: 3dvh;
    text-decoration: none;
    margin: 10px;
    align-items: center;

}



    .intro-mobile {
        display: none;
    }

@media (max-width: 560px) {

    .img-mobile {
        z-index: -100!important;
        display: none!important;
        visibility: hidden!important;
    }

    .intro-mobile {
        position: absolute;           /* Let it flow naturally */
        display: block!important;
        font-size: 20px !important;
        text-align: left;
        padding: 0 5vw;               /* Left/right spacing */
        margin-top: 17dvh;
        width: 80%!important;
        left: auto !important;        /* Override 'left' from global */
        top: auto !important;         /* Override 'top' from global */
        background-color: transparent;
        z-index: 3!important;
    }

    .intro{
        display: hidden!important;
        visibility: hidden!important;
    }

    .filter {
        height: calc(50%)!important;
    }



    .footer {
        color: rgb(255, 255, 255)!important;
        
    }

        .nav-buttons {
        display: none;
    }

    .menu-label {
        display: block;
        font-size: 3dvh;
        background: transparent;
        border: none;
        cursor: pointer;
        color: white;
        padding: 1rem 1rem;
        user-select: none;
        position: fixed;
    }

}

/* When screen is 768px or smaller */
@media (max-width: 768px) {


    .filter {
        position: absolute;
        top: 7dvh;
        left: 0;
        width: 100%;
        height: calc(100% - 7dvh);
        background-color: rgba(0, 0, 0, 0.374);
        backdrop-filter: blur(20px) saturate(150%) contrast(120%);
        -webkit-backdrop-filter: blur(20px) saturate(150%) contrast(120%);
        z-index: 2;
    }

    .img {

        width: 100% !important;
        height: calc(100%-7dvh) !important;
    }

    .intro {
        position: relative;           /* Let it flow naturally */
        font-size: 25px !important;
        text-align: left;
        width: 30% !important;
        padding: 0 5vw;               /* Left/right spacing */
        margin-top: 20dvh;
        left: auto !important;        /* Override 'left' from global */
        right: auto !important;       /* Override 'right' from global */
        top: auto !important;         /* Override 'top' from global */
        background-color: transparent;
        z-index: 3;
    }

    .img-mobile {
        position: absolute;
        top: 7dvh;    
        bottom: 0;        
        right: 0;         
        width: auto;        
        height: 93dvh;  
        object-fit: cover; 
        z-index: 2;  
    }

    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 90%;
        font-size: 10px;
        color: rgb(255, 255, 255);
        background-color: transparent;
        padding: 0 5vw 1dvh;
        text-align: left;
        z-index: 2;
        margin: 0;           /* Clear margin overrides */
        
    }
    .mobile-menu-overlay {
        /* position and size */
        opacity: 0;
        position: fixed;
        top: 7dvh;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.696);
        backdrop-filter: blur(15px) saturate(150%) contrast(120%);
        -webkit-backdrop-filter: blur(15px) saturate(150%) contrast(120%);
        
        /* start hidden and slid up */
        
        transform: translateY(-20px);
        pointer-events: none;
        transition: opacity 0.4s ease, transform 0.4s ease;
        z-index: 10;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .mobile-menu-overlay .nav-buttons {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .mobile-menu-overlay .nav-buttons a {
        padding-left: 0;         /* remove extra padding if any */
        margin-left: 0;          /* ensure no default margin */
        padding: 1rem;
        font-size: 20px;
        text-decoration: none;
        color: white;
        background-color: transparent !important;
    }

    .mobile-menu-overlay .nav-buttons a:hover {
        color: rgb(199, 199, 199);
    }
        .buttonmain:hover {
        background-color: rgba(255, 255, 255, 0.422)!important;
    }
}

@media (min-width: 769px) {
    .img-mobile{
        display: none;
    }
    .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 90%;
        font-size: 10px;
        color: rgb(255, 255, 255);
        background-color: transparent;
        padding: 0 5vw 1dvh;
        text-align: left;
        z-index: 2;
        margin: 0;           /* Clear margin overrides */
        
    }
    .mobile-menu-overlay {
        display: none !important;
    }
}

.header{

    position: absolute;
    top: 8dvh;
    left: 50%!important;
    transform: translateX(-50%)!important;
    font-size: 35px;
    animation: fadeSlideUp 0.5s ease-out forwards;
    text-align: center;
    white-space: nowrap; /* Optional: prevents wrapping */
    color: rgb(255,255,255);
}

.bkg{

    height: 100dvh;
    width: 100%;
    object-fit: cover;

}

.img {
    position: absolute;
    top: 7dvh;    
    bottom: 0;        
    left: 0;         
    width: auto;        
    height: 93dvh;  
    object-fit: cover;   
}

.interface{

    border-width: thin;
    border-style: solid;
    border-color: rgba(0,0,0,0.925);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    background-color: #000000b3;
    overflow-y: auto;
    box-shadow: 0px 25.6px 57.6px rgba(97, 97, 97, 0.86), 0px 0px 16.4px rgba(162, 162, 162, 0.88);
    position: absolute;
    top:10%;
    left:10dvh;
    border-radius: 10px;
    padding: 30px;
    
}

.interface_2{

    background-color: transparent;
    margin-left: 10%;
    margin-right: 10%;
    position: absolute;
    justify-content: center;
    border-radius: 5px;
    padding: 10px;
    align-items: center;
    color: rgb(255,255,255);

}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro {
    position: absolute;
    top: 30%;
    left: 80dvh;
    right: 5%;
    font-size: 30px;
    animation: fadeSlideUp 1s ease-out forwards;
    color: rgb(255,255,255);
}

.button{

    color: rgb(255,255,255);
    text-decoration: none;
    font-size: 20px;
    margin: 10px;
    align-items: center;

}


.button:hover{

    color: rgb(199,199,199);
    font-size: 20px;
    text-decoration: none;
    margin: 10px;
    align-items: center;

}

.buttonmain {
    background-color: rgba(0, 0, 0, 0.386);
    padding: 10px;
    text-decoration: none;
    color: rgb(255, 255, 255);
    border: 1px solid rgb(255, 255, 255);
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 15px;
    
}

.buttonmain:hover {
    cursor: pointer;
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    border: 1px solid rgb(255, 255, 255); 
    border-radius: auto;
    font-size: 15px;
}

.buttontext{

    color: rgb(255,255,255);
    text-decoration: none;

}

.smallheader{

    font-size: 30px;

}

.clicktext{

    color: rgb(255,255,255);
    text-decoration: none;
    font-size: 20px;
    
}

.clicktext:hover{
    
    color: rgb(192,192,192);
    text-decoration: none;
    font-size: 20px;
    
}

.clicktext_s{

    color: rgb(255,255,255);
    text-decoration: none;
    font-size: 15px;

}

.clicktext_s:hover{

    color: rgb(192,192,192);
    text-decoration: none;
    font-size: 15px;

}

.small{

    font-size: 15px;

}

#gallery {
    opacity: 1;
    transform: translateX(0);
}

.grid {
    margin-top: 2rem;   /* less vertical spacing */
    margin-left: auto;
    margin-right: auto;
    padding: 12px;
    width: 90%;          /* shrink container slightly from edges */
    box-sizing: border-box;
}

/* Masonry needs this for its items */
.grid a {
    display: block;
    margin-bottom: 12px;
    margin: 0 12px 12px 0;
    width: 300px; /* or whatever fixed width you want for your items */
    overflow: hidden;
    border-radius: 5px;
}

/* Images fill their container, maintain aspect ratio */
.grid a img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.2s ease;
    display: block;
}

.grid a img:hover {
    transform: scale(1.05);
}

.content {
    animation: fadeSlideUp 0.5s ease-out forwards;
    margin-top: 30dvh;
    max-width: 2048px;      /* limit width for easier reading */
    margin-left: 10%;
    margin-right: 10%;    /* centers the block horizontally */
    text-align: left;      /* left-align text */
    padding: 0 1rem;       /* optional horizontal padding */
    line-height: 1.6;      /* improve readability */
    font-size: 1.1rem;
    color: #fff;           /* inverted text color */
}

/* Theme toggle button */
#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 200; /* above everything */
}

#theme-toggle:hover {
    transform: scale(1.1);
}

/* Dark mode style for the button */
body[data-theme="dark"] #theme-toggle {
    background: rgba(255, 255, 255, 0.7);
    color: black;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    margin-left: 15%;
    margin-right: 15%;
}

.download-row {
    display: flex;
    align-items: center;
    background: #1c1c1c;
    border-radius: 8px;
    padding: 20px;
    gap: 16px;
}

.download-row img {
    width: 160px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    align-items: flex-start;  /* left-align children */
}

.file-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.file-info p {
    margin: 0;
    color: #aaa;
    font-size: 0.9rem;
}


.small{
    font-size: 15px;
}

/* Mobile layout */
@media (max-width: 768px) {

    .file-info p {
    margin: 0;
    color: #aaa;
    font-size: 0.8rem;
}


    .download-row {
        flex-direction: column;
        align-items: center; 
    }

    .download-row img {
        max-width: 100%;   /* scale nicely */
        height: auto;
    }

    .file-info {
        width: 100%;
        margin-top: 10px;
        align-items: center;
    }

}

/* Story list container */
.stories-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 20px;
    margin-left: 7%;
    margin-right: 7%;
}



.story-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

/* Story card */
.story-card {
    display: flex;
    align-items: stretch; /* Make children stretch to same height */
    background: #1c1c1c;
    border-radius: 12px;
    padding: 20px;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-left: 5%!important;
    margin-right: 5%!important;
}

/* Story image */
.story-card img {
    width: 180px;
    height: 100%;         /* Match height of sibling text container */
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
    align-self: stretch;  /* Stretch along the cross-axis */
}

/* Story text section */
.story-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-info h3 {
    margin: 0;
    padding: 5px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.story-info p {
    margin: 0;
    padding: 5px;
    color: #bbb;
    font-size: 1rem;
    line-height: 1.4;
    white-space: pre-line;
}

/* Smaller text class if needed */
.small {
    font-size: 0.85rem;
    color: #888;
}

/* Mobile layout */
@media (max-width: 768px) {
    .story-card {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }

    .story-card img {
        max-width: 100%;
        height: auto;
        align-self: center;
    }

    .story-info {
        width: 100%;
        margin-top: 12px;
        align-items: center;
        text-align: left;
    }

    .story-info p {
        font-size: 1rem;
        text-align: left;
    }
}

/* ------------------------------------
    GALLERY TABS (REWRITTEN + OPTIMIZED)
------------------------------------- */
.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;

    margin: 2rem 0;
    padding: 0 1rem;

    position: relative;
}

/* Individual Tab */
.gallery-tab {
    padding: 8px 18px;
    font-size: 16px;
    font-weight: 500;

    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;

    cursor: pointer;
    user-select: none;

    backdrop-filter: blur(10px) saturate(140%) contrast(120%);
    -webkit-backdrop-filter: blur(10px) saturate(140%) contrast(120%);

    transition: 
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Hover */
.gallery-tab:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}

/* Active (Selected Tab) */
.gallery-tab.active {
    background: rgba(255, 255, 255, 0.85);
    color: #000;

    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 6px 18px rgba(0,0,0,0.55);

    transform: translateY(-2px);
}


